const { BigNumber } = require('ethers');

async function main() {
    const feeReceiver = "0x94AaD901D8418E61F3beC7cC331072317A35511f";  // 手续费收取账户地址
    const feeSellerAmount = BigNumber.from( "1000000000000000000");  // 规定卖家手续费  测试 1
    const feeBuyerAmount = BigNumber.from( "0");  // 规定买家手续费
    const feeToken = "0x55d398326f99059ff775485246999027b3197955"; // 支付token BRC20-USDT 地址

    const NFTSwap = await ethers.getContractFactory("NFTSwap");
    const instance = await upgrades.deployProxy(NFTSwap, [feeReceiver, feeSellerAmount, feeBuyerAmount, feeToken], { initializer: '__NFTSwap_init' });
    await instance.deployed();
    console.log("NFTSwap deployed to:", instance.address);
}

main()
    .then(() => process.exit(0))
    .catch((error) => {
        console.error(error);
        process.exit(1);
    });
